$("html").css('height',document.documentElement.clientHeight)
function ech1(res,dom){
	var myChart1 = echarts.init(document.getElementById(dom));
	option1 = {
	    tooltip: {
	        trigger: 'item',
	        formatter: '{a} <br/>{b}: {c} ({d}%)'
	    },		
	    legend: {
			type: 'scroll',
	        orient: 'horizontal',
			icon:'circle',
			itemWidth:10,
			itemHeight:10,
			bottom:"0%",
	        right: "15%",
	        data: res.names,
			textStyle: {
				color:res.color,
				fontSize: 14,
			}
	    },
		color:res.color,
	    series: [
	        {
	            name: res.title,
	            type: 'pie',
	            radius: ['40%', '48%'],				
				startAngle:270,
	            avoidLabelOverlap: false,
	            labelLine: {
	            	normal: {
	            		length: 25,
	            		length2: 40
	            	}	 
	            },
	            label: {
	            	normal: {
	            		formatter: '{d}%\n',
	            		fontSize:16,
						fontFamily:'UNIDREAMLED',
	            		padding: [0, -40],
	            	}
	            },
	            data: res.data	           
	        }
	    ]
	};
	myChart1.setOption(option1);
		
}


function ech2(res,dom){
	var myChart2 = echarts.init(document.getElementById(dom));
	option2 = {
		tooltip: {
			trigger: 'axis',
			textStyle: {
				align:'center'
			}				
		},
		legend: {
			orient: 'horizontal',
			data:res.names,
			icon:'circle',
			itemWidth:12,
			itemHeight:12,
			textStyle: {
				color: '#69b8ff',
				fontSize: 12,
				padding: [0, 0, 0, 5]
			},
			top: '8%',
			itemGap: 50							
		},
		xAxis: {
			type: 'category',
			boundaryGap: false,
			data:res.datax,
			axisLabel: {
				interval:0,								
				textStyle:{
					color:'#657ca8',  //坐标的字体颜色
					top:20,
					lineHeight:14,
					fontSize:14
				}
			},
			axisLine:{
				lineStyle:{
					color:'#222856',
					width:1,   //这里是坐标轴的宽度,可以去掉
					fontSize:14
				}
			}
		},
		yAxis: {
			type: 'value',
			name:'kwh',
			nameTextStyle:{
				color:'#657ca8',
				fontSize:14
			},
			splitLine: {
				show: false,
				lineStyle: {
					color: '#2174c0',
				},
		　　},
			axisLine:{
				lineStyle:{
					color:'#222856',
					fontSize:14,
					width:1,   //这里是坐标轴的宽度,可以去掉
				}
			},
			axisLabel: {							
				textStyle:{
					color:'#657ca8',  //坐标的字体颜色
					top:20,
					lineHeight:14,
					fontSize:14
				},
				formatter: function (value) {
					return value+res.cell;	
				}
			},
		},
		textStyle:{
			color:'#657ca8',
			fontSize:14
		},
		grid : {
			top:'30%',
			left : '3%',   //组件离容器左侧的距离
			right : '6%',
			bottom : '0%',
			containLabel : true     //grid 区域是否包含坐标轴的刻度标签
		},			
		series: [{
			name:res.names[0]['name'],
			data: res.data1,
			type: 'line',
			smooth:res.smooth,
			lineStyle:{
				color: "#228ffe" ,
			},
			areaStyle: {
				// color:'rgba(0,229,59,0.4)',
				color: new echarts.graphic.LinearGradient(
					0, 0, 0, 1,
					[{
							offset: 0,
							color: 'rgba(86,169,253,0.6)'
						}, //柱图渐变色
						{
							offset: 1,
							color: 'rgba(86,169,253,0)'
						}, //柱图渐变色
					]
				)
			},
			symbol: 'circle',
			symbolSize: 6,
			itemStyle:{
				 normal: {
					color: "#228ffe"
				}
			}
		},
		{
			name:res.names[1]['name'],
			data: res.data2,
			type: 'line',
			smooth:res.smooth,
			lineStyle:{
				color: "#f8eb0e" ,
			},
			areaStyle: {
				// color:'rgba(0,255,252,0.4)',
				color: new echarts.graphic.LinearGradient(
					0, 0, 0, 1,
					[{
							offset: 0,
							color: 'rgba(248,235,14,0.6)'
						}, //柱图渐变色
						{
							offset: 1,
							color: 'rgba(248,235,14,0)'
						}, //柱图渐变色
					]
				)
			},
			symbol: 'circle',
			symbolSize: 6,
			itemStyle:{
				 normal: {
					color: "#f8eb0e"
				}
			}
		}]
	};
	myChart2.setOption(option2);
}
	
function ech3(res,dom){
	var myChart3 = echarts.init(document.getElementById(dom));
	var series=[]
	res.dataxs.forEach(function(item,key){
		if(key==3){
			series.push({
				name: item.name,
				type: 'bar',
				barWidth :15,
				stack: '总量',
				label: {
					show: false,
					position: 'top'
				},
				data: item.data,
				label: {
					normal: {
						show: true,
						position: 'top',
						color:'#83bbf7',
						formatter:function(param){
							return option3.series[3].data[param.dataIndex]+option3.series[2].data[param.dataIndex]+option3.series[1].data[param.dataIndex]+option3.series[0].data[param.dataIndex];
						}
					} 
				}
			})
		}else{
			series.push({
				name: item.name,
				type: 'bar',
				barWidth :15,
				stack: '总量',
				label: {
					show: false,
					position: 'top'
				},
				data: item.data
			})
		}
		
	})
	option3 = {
		tooltip: {
			trigger: 'axis',
			axisPointer: {            // 坐标轴指示器，坐标轴触发有效
				type: 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
			}
		},
		color:['#5f45ff','#0ecffb','#2485ff','#f6d10b'],
		legend: {
			orient: 'horizontal',
			icon:'circle',
			data:res.names,	
			itemWidth:10,
			itemHeight:10,
			textStyle: {
				color:['#69b8ff'],
				fontSize: 12,
				padding: [0, 0, 0, 5]
			},
			top: '10%',
			itemGap: 10							
		},
		grid: {
			left: '3%',
			right: '4%',
			top: '30%',
			bottom:0,
			containLabel: true
		},
		yAxis: {
			type: 'value',
			name:'kwh',
			nameTextStyle:{
				color:'#657ca8',
				fontSize:14
			},
			splitLine: {
				show: false,
				lineStyle: {
					color: '#2174c0',
				},
		　　},
			axisLabel: {
				interval:0,								
				textStyle:{
					color:'#657ca8',  //坐标的字体颜色
					top:20,
					lineHeight:14,
					fontSize:14
				}
			},
			axisLine:{
				lineStyle:{
					color:'#222856',
					width:1,   //这里是坐标轴的宽度,可以去掉
					fontSize:14
				}
			}
		},
		xAxis: {
			type: 'category',
			data:res.datax,
			axisLabel: {
				interval:0,								
				textStyle:{
					color:'#657ca8',  //坐标的字体颜色
					lineHeight:14,
					fontSize:14
				}
			},
			axisLine:{
				lineStyle:{
					color:'#222856',
					width:1,   //这里是坐标轴的宽度,可以去掉
					fontSize:14
				}
			}
		},
		series: series
	};
	myChart3.setOption(option3);
}

function ech4(res,dom){
	var myChart4 = echarts.init(document.getElementById(dom));
	option4 = {
	    tooltip: {
	        trigger: 'item',
	        formatter: '{b}: {c} ({d}%)'
	    },
	    legend: {
	        orient: 'horizontal',
			icon:'circle',
			bottom:"0%",
	        right: "15%",
			itemWidth:10,
			itemHeight:10,
	        data: res.names,
			formatter: function (value) {
				for(var i=0;i<res.data.length;i++){
					if(value==res.data[i]['name']){
						return value + res.data[i]['value'] + '个';	
					}
				}
			},
			textStyle: {
				color:'#fff',
				fontSize: 14,
				padding: [0, 20, 0, 0]
			}
	    },
		color:res.color,
	    series: [
	        {
	            type: 'pie',
	            radius: ['38%', '48%'],		
	            avoidLabelOverlap: false,
	            labelLine: {
	            	normal: {
	            		length: 15,
	            		length2: 30
	            	}	 
	            },
	            label: {
	            	normal: {
	            		formatter: '{c}\n',
	            		fontSize:24,
						fontFamily:'UNIDREAMLED',
	            		padding: [0, -30],
	            	}
	            },
	            data: res.data	           
	        }
	    ]
	};
	myChart4.setOption(option4);
		
}

function ech5(res,dom){
	var myChart5 = echarts.init(document.getElementById(dom));
	option5 = {
	    tooltip: {
	        trigger: 'item',
	        formatter: '{b}: {c} ({d}%)'
	    },
		title: {
			text: res.title,
			y:'center',
			x:'27%',
			textStyle: {
				fontSize:16,
				fontWeight:'bold',
				color: ['#fff']
			}
		},
	    legend: {
	        orient: 'vertical',
			icon:'circle',
			bottom:"20%",
	        right: "0%",
			itemWidth:10,
			itemHeight:10,
			itemGap: 20,	
	        data: res.names,
			textStyle: {
				color:'#fff',
				fontSize: 14,
				padding: [0, 20, 0, 0]
			}
	    },
		color:res.color,
	    series: [
	        {
	            type: 'pie',
	            radius: ['54%', '62%'],	
				center:['40%','50%'],
	            avoidLabelOverlap: false,
	            labelLine: {
	            	normal: {
	            		length: 25,
	            		length2: 30
	            	}	 
	            },
	            label: {
	            	normal: {
	            		formatter: '{c}\n',
	            		fontSize:24,
						fontFamily:'UNIDREAMLED',
	            		padding: [0, -30],
	            	}
	            },
	            data: res.data	           
	        }
	    ]
	};
	myChart5.setOption(option5);
		
}


function ech6(res,dom){
	var myChart6 = echarts.init(document.getElementById(dom));
	option6 = {
		tooltip: {
			trigger: 'axis',
			textStyle: {
				align:'center'
			}				
		},
		xAxis: {
			type: 'category',
			boundaryGap: false,
			data:res.datax,
			axisLabel: {							
				textStyle:{
					color:'#657ca8',  //坐标的字体颜色
					top:20,
					lineHeight:14,
					fontSize:14
				}
			},
			axisLine:{
				lineStyle:{
					color:'#222856',
					width:1,   //这里是坐标轴的宽度,可以去掉
					fontSize:14
				}
			}
		},
		yAxis: {
			type: 'value',
			name:'数量',
			nameTextStyle:{
				color:'#657ca8',
				fontSize:14
			},
			splitLine: {
				show: false,
				lineStyle: {
					color: '#2174c0',
				},
		　　},
			axisLine:{
				lineStyle:{
					color:'#222856',
					fontSize:14,
					width:1,   //这里是坐标轴的宽度,可以去掉
				}
			},
			axisLabel: {							
				textStyle:{
					color:'#657ca8',  //坐标的字体颜色
					top:20,
					lineHeight:14,
					fontSize:14
				}
			},
		},
		textStyle:{
			color:'#657ca8',
			fontSize:14
		},
		grid : {
			top:'20%',
			left : '5%',   //组件离容器左侧的距离
			right : '10%',
			bottom : '3%',
			containLabel : true     //grid 区域是否包含坐标轴的刻度标签
		},			
		series: [{
			data: res.data1,
			type: 'line',
			smooth:res.smooth,
			lineStyle:{
				color: "#228ffe" ,
			},
			areaStyle: {
				// color:'rgba(0,229,59,0.4)',
				color: new echarts.graphic.LinearGradient(
					0, 0, 0, 1,
					[{
							offset: 0,
							color: 'rgba(86,169,253,0.6)'
						}, //柱图渐变色
						{
							offset: 1,
							color: 'rgba(86,169,253,0)'
						}, //柱图渐变色
					]
				)
			},
			symbol: 'circle',
			symbolSize: 6,
			itemStyle:{
				 normal: {
					color: "#228ffe"
				}
			}
		}]
	};
	myChart6.setOption(option6);
}

function ech7(res,dom){
	var myChart7 = echarts.init(document.getElementById(dom));
	option7 = {
		tooltip: {
			trigger: 'axis',
			textStyle: {
				align:'center'
			}				
		},
		legend: {
			orient: 'horizontal',
			data:res.names,
			icon:'circle',
			itemWidth:12,
			itemHeight:12,
			textStyle: {
				color: '#69b8ff',
				fontSize: 12,
				padding: [0, 0, 0, 5]
			},
			top: '5%',
			itemGap: 50							
		},
		xAxis: {
			type: 'category',
			boundaryGap: false,
			data:res.datax,
			min:0,
			axisLabel: {
				interval:0,								
				textStyle:{
					color:'#657ca8',  //坐标的字体颜色
					top:20,
					lineHeight:14,
					fontSize:14
				},
				formatter: function (value,key) {
					if(key%2!=0){
						return value;	
					}
				}
			},
			axisLine:{
				lineStyle:{
					color:'#222856',
					width:1,   //这里是坐标轴的宽度,可以去掉
					fontSize:14
				}
			}
		},
		yAxis: {
			type: 'value',
			name:'℃',
			nameTextStyle:{
				color:'#657ca8',
				fontSize:14
			},
			splitLine: {
				show: false,
				lineStyle: {
					color: '#2174c0',
				},
		　　},
			axisLine:{
				lineStyle:{
					color:'#222856',
					fontSize:14,
					width:1,   //这里是坐标轴的宽度,可以去掉
				}
			},
			axisLabel: {							
				textStyle:{
					color:'#657ca8',  //坐标的字体颜色
					top:20,
					lineHeight:14,
					fontSize:14
				},
				formatter: function (value) {
					return value+res.cell;	
				}
			},
		},
		textStyle:{
			color:'#657ca8',
			fontSize:14
		},
		grid : {
			top:'25%',
			left : '2%',   //组件离容器左侧的距离
			right : '2.5%',
			bottom : '0%',
			containLabel : true     //grid 区域是否包含坐标轴的刻度标签
		},			
		series: [{
			name:res.names[0]['name'],
			data: res.data1,
			type: 'line',
			smooth:res.smooth,
			lineStyle:{
				color: "#5f45ff" ,
			},
			areaStyle: {
				// color:'rgba(0,229,59,0.4)',
				color: new echarts.graphic.LinearGradient(
					0, 0, 0, 1,
					[{
							offset: 0,
							color: 'rgba(95,69,255,0.6)'
						}, //柱图渐变色
						{
							offset: 1,
							color: 'rgba(95,69,255,0)'
						}, //柱图渐变色
					]
				)
			},
			symbol: 'circle',
			symbolSize: 6,
			itemStyle:{
				 normal: {
					color: "#5f45ff"
				}
			}
		},
		{
			name:res.names[1]['name'],
			data: res.data2,
			type: 'line',
			smooth:res.smooth,
			lineStyle:{
				color: "#228ffe" ,
			},
			areaStyle: {
				// color:'rgba(0,255,252,0.4)',
				color: new echarts.graphic.LinearGradient(
					0, 0, 0, 1,
					[{
							offset: 0,
							color: 'rgba(33,139,248,0.6)'
						}, //柱图渐变色
						{
							offset: 1,
							color: 'rgba(33,139,248,0)'
						}, //柱图渐变色
					]
				)
			},
			symbol: 'circle',
			symbolSize: 6,
			itemStyle:{
				 normal: {
					color: "#228ffe"
				}
			}
		},{
			name:res.names[2]['name'],
			data: res.data3,
			type: 'line',
			smooth:res.smooth,
			lineStyle:{
				color: "#f45e23" ,
			},
			areaStyle: {
				// color:'rgba(0,255,252,0.4)',
				color: new echarts.graphic.LinearGradient(
					0, 0, 0, 1,
					[{
							offset: 0,
							color: 'rgba(244,94,35,0.6)'
						}, //柱图渐变色
						{
							offset: 1,
							color: 'rgba(244,94,35,0)'
						}, //柱图渐变色
					]
				)
			},
			symbol: 'circle',
			symbolSize: 6,
			itemStyle:{
				 normal: {
					color: "#f45e23"
				}
			}
		},{
			name:res.names[3]['name'],
			data: res.data4,
			type: 'line',
			smooth:res.smooth,
			lineStyle:{
				color: "#f6d10b" ,
			},
			areaStyle: {
				// color:'rgba(0,255,252,0.4)',
				color: new echarts.graphic.LinearGradient(
					0, 0, 0, 1,
					[{
							offset: 0,
							color: 'rgba(246,209,11,0.6)'
						}, //柱图渐变色
						{
							offset: 1,
							color: 'rgba(246,209,11,0)'
						}, //柱图渐变色
					]
				)
			},
			symbol: 'circle',
			symbolSize: 6,
			itemStyle:{
				 normal: {
					color: "#f6d10b"
				}
			}
		}]
	};
	myChart7.setOption(option7);
}

function ech8(res,dom){
	var myChart8 = echarts.init(document.getElementById(dom));
	var series=[]
	res.dataxs.forEach(function(item,key){
		if(key<2){
			series.push({
				name: item.name,
				type: 'bar',
				barWidth :10,
				label: {
					show: false,
					position: 'top'
				},
				data: item.data,
				color: item.color
			})
		}else{
			series.push({
				name:item.name,
				data: item.data,
				type: 'line',
				yAxisIndex: 1,
				smooth:false,
				lineStyle:{
					color: "#27e55c" ,
				},
				areaStyle: {
					color: item.color
				},
				symbol: 'circle',
				symbolSize: 6,
				itemStyle:{
					 normal: {
						color: "#27e55c"
					}
				}
			})
		}
	})
	option8 = {
		tooltip: {
			trigger: 'axis',
			axisPointer: {            // 坐标轴指示器，坐标轴触发有效
				type: 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
			}
		},
		color:['#f7df0c','#02c4f5','#27df5b'],
		legend: {
			orient: 'horizontal',
			data:res.names,	
			icon:'circle',
			itemWidth:10,
			itemHeight:10,
			textStyle: {
				color:'#657ca8',
				fontSize: 12,
				padding: [0, 0, 0, 5]
			},
			top: '5%',
			itemGap: 10							
		},
		grid: {
			left: '3%',
			right: '4%',
			top: '25%',
			bottom:0,
			containLabel: true
		},
		yAxis: [{
			type: 'value',
			name:'万',
			nameTextStyle:{
				color:'#657ca8',
				fontSize:14
			},
			splitLine: {
				show: false,
				lineStyle: {
					color: '#2174c0',
				},
		　　},
			axisLabel: {
				interval:0,								
				textStyle:{
					color:'#657ca8',  //坐标的字体颜色
					top:20,
					lineHeight:14,
					fontSize:14
				}
			},
			axisLine:{
				lineStyle:{
					color:'#222856',
					width:1,   //这里是坐标轴的宽度,可以去掉
					fontSize:14
				}
			}
		},{
			type: 'value',
			name:'℃',
			nameTextStyle:{
				color:'#657ca8',
				fontSize:14
			},
			splitLine: {
				show: false,
				lineStyle: {
					color: '#2174c0',
				},
		　　},
			axisLabel: {
				interval:0,								
				textStyle:{
					color:'#657ca8',  //坐标的字体颜色
					top:20,
					lineHeight:14,
					fontSize:14
				},
				formatter: function (value) {
					return '-' +value;	
				}
			},
			axisLine:{
				lineStyle:{
					color:'#222856',
					width:1,   //这里是坐标轴的宽度,可以去掉
					fontSize:14
				}
			}
		}],
		xAxis: {
			type: 'category',
			data:res.datax,
			axisLabel: {
				interval:0,								
				textStyle:{
					color:'#657ca8',  //坐标的字体颜色
					lineHeight:14,
					fontSize:14
				}
			},
			axisLine:{
				lineStyle:{
					color:'#222856',
					width:1,   //这里是坐标轴的宽度,可以去掉
					fontSize:14
				}
			}
		},
		series: series
	};
	myChart8.setOption(option8);
}

function ech9(res,dom){
	var myChart9 = echarts.init(document.getElementById(dom));
	option9 = {
	    tooltip: {
	        trigger: 'item',
	        formatter: '{b}: {c} ({d}%)'
	    },
		title: {
			text: res.title,
			y:'53%',
			x:'10%',
			textStyle: {
				fontSize:20,
				fontWeight:'bold',
				color: ['#1b86ff']
			}
		},
	    legend: [
			{
			    orient: 'vertical',
				bottom:"18%",
				right: "0%",
				icon:'circle',
				itemWidth:10,
				itemHeight:10,
				itemGap: 15,	
				data: res.names,
				formatter: function (value) {
					for(var i=0;i<res.data.length;i++){
						if(value==res.data[i]['name']){
							return res.data[i]['value']+'{b|'+res.data[i]['cell']+'}'+Math.floor(res.data[i]['value']/res.total*100 )+"%";	
						}
					}
				},
				textStyle: {
					color:'#1b86ff',
					fontSize: 18,
					fontFamily:'UNIDREAMLED',
					padding: [0, 10, 0, 0],
					rich: {
						b:{
							fontSize:16,
							padding:[0,20,0,3],
							margin:0
						}	                    
					}
				}
			},
			{
				top:"15%",
				right: "0%",
				icon:'circle',
				itemWidth:10,
				itemHeight:10,
				itemGap: 20,	
				data: res.names,
				textStyle: {
					color:'#657ca8',
					fontSize: 14,
					padding: [0, 20, 0, 0]
				}
			}
		],
		color:res.color,
	    series: [
	        {
	            name: res.title,
	            type: 'pie',
	            radius: ['35%', '45%'],	
				center:['20%','60%'],
				startAngle:270,
	            avoidLabelOverlap: false,
	            labelLine: {
	            	normal: {
	            		length: 15,
	            		length2: 40
	            	}	 
	            },
	            label: {					
	            	normal: {
						show:false
	            	}
	            },
	            data: res.data	           
	        }
	    ]
	};
	myChart9.setOption(option9);
		
}

function ech10(res,dom){
	var series=[]
	res.datas.forEach(function(item){
		series.push({
			name:item.name,
			data: item.data,
			type: 'line',
			smooth:res.smooth,
			symbol:'none',
			color:item.color
		})
	})
	var myChart10 = echarts.init(document.getElementById(dom));
	option10 = {
		tooltip: {
			trigger: 'axis',
			textStyle: {
				align:'center'
			}				
		},
		legend: {
			orient: 'horizontal',
			data:res.names,
			icon:'circle',
			itemWidth:12,
			itemHeight:12,
			textStyle: {
				color: ['#657ca8'],
				fontSize: 12,
				padding: [0, 0, 0, 5]
			},
			left:'10%',
			top: '5%'						
		},
		xAxis: {
			type: 'category',
			boundaryGap: false,
			data:res.datax,
			axisLabel: {
				interval:0,								
				textStyle:{
					color:'#657ca8',  //坐标的字体颜色
					top:20,
					lineHeight:14,
					fontSize:12
				},
				formatter: function (value,key) {
					if(key%2!=0){
						return value;	
					}
				}
			},
			axisLine:{
				lineStyle:{
					color:'#222856',
					width:1,   //这里是坐标轴的宽度,可以去掉
					fontSize:12
				}
			}
		},
		yAxis: {
			type: 'value',
			name:'℃',
			nameTextStyle:{
				color:'#657ca8',
				fontSize:14
			},
			splitLine: {
				show: false,
				lineStyle: {
					color: '#2174c0',
				},
		　　},
			axisLine:{
				lineStyle:{
					color:'#222856',
					fontSize:14,
					width:1,   //这里是坐标轴的宽度,可以去掉
				}
			},
			axisLabel: {							
				textStyle:{
					color:'#657ca8',  //坐标的字体颜色
					top:20,
					lineHeight:14,
					fontSize:14
				},
				formatter: function (value) {
					return value+res.cell;	
				}
			},
		},
		textStyle:{
			color:'#657ca8',
			fontSize:14
		},
		grid : {
			top:'35%',
			left : '3%',   //组件离容器左侧的距离
			right : '6%',
			bottom : '0%',
			containLabel : true     //grid 区域是否包含坐标轴的刻度标签
		},			
		series: series
	};
	myChart10.setOption(option10);
}

function ech11(res,dom){
	var myChart11 = echarts.init(document.getElementById(dom));
	var series=[]
	res.dataxs.forEach(function(item,key){
		if(key<2){
			series.push({
				name: item.name,
				type: 'bar',
				barWidth :10,
				data: item.data,
				color: item.color
			})
		}else{
			series.push({
				name:item.name,
				data: item.data,
				type: 'line',
				yAxisIndex: 1,
				smooth:false,
				label: {
					show: true,
					position: 'top',
					color:'#5c719c',
					fontSize:16,
					formatter: '{c} ℃'
				},
				lineStyle:{
					color: "#02d1fe" ,
				},
				areaStyle: {
					color: item.color
				},
				symbol: 'circle',
				symbolSize: 6,
				itemStyle:{
					 normal: {
						color: "#fff"
					}
				}
			})
		}
	})
	option11 = {
		tooltip: {
			trigger: 'axis',
			axisPointer: {            // 坐标轴指示器，坐标轴触发有效
				type: 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
			}
		},
		color:['#f7df0c','#02c4f5','#27df5b'],
		legend: {
			orient: 'horizontal',
			data:res.names,	
			icon:'circle',
			itemWidth:10,
			itemHeight:10,
			textStyle: {
				color:'#657ca8',
				fontSize: 12,
				padding: [0, 0, 0, 5]
			},
			top: '5%',
			itemGap: 10							
		},
		grid: {
			left: '3%',
			right: '4%',
			top: '25%',
			bottom:0,
			containLabel: true
		},
		yAxis: [{
			type: 'value',
			name:'kwh',
			nameTextStyle:{
				color:'#657ca8',
				fontSize:14
			},
			splitLine: {
				show: false,
				lineStyle: {
					color: '#2174c0',
				},
		　　},
			axisLabel: {
				interval:0,								
				textStyle:{
					color:'#657ca8',  //坐标的字体颜色
					top:20,
					lineHeight:14,
					fontSize:14
				}
			},
			axisLine:{
				lineStyle:{
					color:'#222856',
					width:1,   //这里是坐标轴的宽度,可以去掉
					fontSize:14
				}
			}
		},{
			type: 'value',
			name:'',
			nameTextStyle:{
				color:'#657ca8',
				fontSize:14
			},
			splitLine: {
				show: false,
				lineStyle: {
					color: '#2174c0',
				},
		　　},
			axisLabel: {
				show: false,
				interval:0,								
				textStyle:{
					color:'#657ca8',  //坐标的字体颜色
					top:20,
					lineHeight:14,
					fontSize:14
				}
			},
			axisLine:{
				show: false,
				lineStyle:{
					color:'#222856',
					width:1,   //这里是坐标轴的宽度,可以去掉
					fontSize:14
				}
			}
		}],
		xAxis: {
			type: 'category',
			data:res.datax,
			axisLabel: {
				interval:0,								
				textStyle:{
					color:'#657ca8',  //坐标的字体颜色
					lineHeight:14,
					fontSize:14
				}
			},
			axisLine:{
				lineStyle:{
					color:'#222856',
					width:1,   //这里是坐标轴的宽度,可以去掉
					fontSize:14
				}
			}
		},
		series: series
	};
	myChart11.setOption(option11);
}

function ech12(res,dom){
	var myChart12 = echarts.init(document.getElementById(dom));
	option12 = {
	    tooltip: {
	        trigger: 'item',
	        formatter: '{b}: {c} ({d}%)'
	    },
		title: {
			text: res.title,
			y:'53%',
			x:'10%',
			textStyle: {
				fontSize:20,
				fontWeight:'bold',
				color: ['#1b86ff']
			}
		},
	    legend: [
			{
			    orient: 'vertical',
				top:"45%",
				left: "10%",
				icon:'circle',
				itemWidth:10,
				itemHeight:10,
				itemGap: 30,	
				data: res.names,
				formatter: function (value) {
					for(var i=0;i<res.data.length;i++){
						if(value==res.data[i]['name']){
							return '{per|'+value+'}' + res.data[i]['value']+'{b|'+res.data[i]['cell']+'}'+Math.floor(res.data[i]['value']/res.total*100 )+"%";	
						}
					}
				},
				textStyle: {
					color:'#1b86ff',
					fontSize: 18,
					fontFamily:'UNIDREAMLED',
					padding:0,
					margin:0,
					rich: {
					    per:{
					        color: '#657ca8',
							fontSize:16,
							padding:[0,20,0,0],
					    },
						b:{
							fontSize:16,
							padding:[0,20,0,0],
							margin:0
						}	                    
					}
				}
			},
			{
				orient: 'vertical',
				top:"5%",
				right: "0%",
				icon:'circle',
				itemWidth:10,
				itemHeight:10,
				itemGap: 20,	
				data: res.names,
				textStyle: {
					color:'#657ca8',
					fontSize: 14,
					padding: [0, 20, 0, 0]
				}
			}
		],
		color:res.color,
	    series: [
	        {
	            name: res.title,
	            type: 'pie',
	            radius: ['35%', '45%'],	
				center:['35%','20%'],
				startAngle:270,
	            avoidLabelOverlap: false,
	            labelLine: {
	            	normal: {
	            		length: 15,
	            		length2: 40
	            	}	 
	            },
	            label: {					
	            	normal: {
						show:false
	            	}
	            },
	            data: res.data	           
	        }
	    ]
	};
	myChart12.setOption(option12);
		
}

function ech13(res,dom){		
	var myChart13 = echarts.init(document.getElementById(dom));
	var series=[]
	res.datas.forEach(function(item){
		series.push({
				name: item.name,
				type: 'bar',
				stack: '总量',
				coordinateSystem: "polar",
				barWidth: 6, //宽度
				data: item.data
			})
	})
	option13 = {
		tooltip: {
			trigger: 'item',
			formatter: " {b}<br/>{a}占比：{c}%",
		},
		legend: {
			right: '0',
			top: '15',
			itemWidth: 16,
			itemHeight: 8,
			data: res.names,
			textStyle: {
				color: '#fff',
			}
		},
		polar: {
			radius: '90%' ,//图形大小
			center:['50%','60%']
		},
		angleAxis: {
			type: 'value',
			startAngle: 90,
			clockwise:false,
			min: 0,
			max: 135,
			splitNumber: 15, //坐标轴分割段数
			axisLine: { //坐标轴轴线设置
				lineStyle: {
					color: 'transparent',
				}
			},
			splitLine: { //分割线设置
				show: false,
			},
			axisLabel: { //刻度标签设置
				show: false
			},
		},
		radiusAxis: {
			type: 'category',
			data: res.datax,
			axisLine: { //坐标轴轴线设置
				show: false,
			},
			axisTick: { //坐标轴刻度设置
				show: false
			},
			axisLabel: { //刻度标签设置
				margin: -43, //刻度与坐标轴之间的距离
				interval: 0,
				textStyle: {
					color: '#fff',
					fontSize: 12,
					color:'#3f99ff',
					rich:{
						circle:{
							color:'#f3d103',
							padding:[0,5,0,0]
						}
					}
				},
				formatter: function(value) {
					if(value){
						return '{circle|●} '+value;
					}						
				},
			}
		},
		color: res.color,
		series: series
	};
	myChart13.setOption(option13);
}

function ech14(res,dom){
	var myChart14 = echarts.init(document.getElementById(dom));
	option14 = {		   
		series: [{
			name: '',
			type: 'gauge',
			radius : '90%',			 
			axisLine: {
				lineStyle: {
					width: 10,
					color: [[1,new echarts.graphic.LinearGradient(0, 0, 1, 0, [
							  {
								offset: 0.1,
								color: "#fe422f"
							  },{
								offset: 0.3,
								color: "#ffff00"
							  },{
								offset: 0.6,
								color: "#24ff35"
							  },{
								offset: 1,
								color: "#407fff"
							  }
					])]],
				}
			},
			 pointer: {
			   //指针长度
			   length:'50%',
			   width:5
			},
			axisTick: {
				show: false
			},
			splitLine: {    
				show: false
			},
			axisLabel: {
				distance: -10,
				color: '#fff',
				fontSize: 12
			},
			 detail: {
				valueAnimation: true,
				fontSize: 16,
				color:'#fff800',
				offsetCenter: [0, '85%'],
				formatter: function (value) {
					return value.toFixed(2) + '%';
				},
			},
			data:res
		}]
	};
	myChart14.setOption(option14);
}
// 单位数补0
 function change(t){
	if(t<10){
	 return "0"+t;
	}else{
	 return t;
	}
 }
 // 当前时间
function formDate(){
	setInterval(function(){
		var d=new Date();
		var year=d.getFullYear();
		var month= change(d.getMonth()+1);
		var day= change(d.getDate());
		var hour= change(d.getHours());
		var minute= change(d.getMinutes());
		var second= change(d.getSeconds());
		var time=year+'-'+month+'-'+day+' '+hour+':'+minute+':'+second;
		var weekarr = ["日", "一", "二", "三", "四", "五", "六"]; 
		var key=d.getDay()
		document.getElementById('riqi').innerHTML=year+' - '+month+' - '+day+  '&nbsp;&nbsp;'+ hour +' : '+minute
		document.getElementById('week').innerHTML='星期'+weekarr[key]
	},1000)			
}


// 向上滚动函数
function topScroll(enType,steep) { //滚动效果函数
  var noticeListH = $(enType+" li").height(), //获取滚动的li的高度
	noticeH = $(enType).parent().height(), //获取展示区域的高度
	noticeHListNum = Math.ceil(noticeH / noticeListH), //获取展示区域一共可以展示多少条数据,这里是因为布局的原因才*2的如果一行只有一个不需要*2
	listNum = $(enType+" li").length;
  if(listNum > noticeHListNum) {
	$(enType).animate({
	  'marginTop':-noticeListH+'px'
	},steep,'swing',function() { //当动画结束直接回调下面的函数
	  $(enType+' li:first').appendTo($(enType));
	  $(enType).css({'marginTop':'0'+'px'});
	});
  }
}